// import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_syt/domain/widgets/network_load_image.dart';

class ImageLoader {
  static Widget loadImage({
    required String imageUrl,
    double? width,
    double? height,
    Color? color,
    // ProgressIndicatorBuilder? progressIndicatorBuilder,
  }) {
    // return Container(
    //   child:

    //   CachedNetworkImage(
    //     imageUrl: imageUrl,
    //     errorWidget: (ctx, err, trace) {
    //       return Container(
    //         width: 89,
    //         height: 35,
    //         color: Colors.grey.withOpacity(0.7),
    //       );
    //     },
    //     fit: BoxFit.cover,
    //     width: width,
    //     height: height,
    //   ),
    // );
    return NetworkLoadImage.loadNetworkImage(
      imageUrl,
      width: width,
      height: height,
      color: color
    );
  }
}
